package com.jhgsys.internal.base.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 业务通知 Entity
 *
 * @author Lujiachen
 * @date 2024-08-12 13:07:19
 */
@Data
@TableName("base_notice")
public class BaseNotice implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "notice_id", type = IdType.ASSIGN_UUID)
    @Size(max = 32, message = "{noMoreThan}")
    private String noticeId;

    /**
     * 公司Id
     */
    @TableField("tenant_id")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String tenantId;

    /**
     * 通知模块;
     * 1：事故管理 2：违章管理 3：隐患管理 4：激励管理 ....
     */
    @TableField("notice_module")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String noticeModule;

    /**
     * 通知业务;
     * 1：事故调查分配通知 2：事故调查审核通知 3：事故调查审核退回通知 4：事故整改分配通知 5：事故整改审核通知 6：事故整改审核退回通知
     */
    @TableField("notice_object")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String noticeObject;

    /**
     * 通知对象Id
     */
    @TableField("notice_object_id")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String noticeObjectId;

    /**
     * 通知标题
     */
    @TableField("notice_title")
    @NotBlank(message = "{required}")
    @Size(max = 150, message = "{noMoreThan}")
    private String noticeTitle;

    /**
     * 通知标内容
     */
    @TableField("notice_content")
    @NotBlank(message = "{required}")
    @Size(max = 500, message = "{noMoreThan}")
    private String noticeContent;

    /**
     * 发送时间
     */
    @TableField("send_date")
    @NotNull(message = "{required}")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date sendDate;

    /**
     * 接收人Id
     */
    @TableField("receive_user_id")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String receiveUserId;

    /**
     * 接收人姓名
     */
    @TableField("receive_real_name")
    @NotBlank(message = "{required}")
    @Size(max = 150, message = "{noMoreThan}")
    private String receiveRealName;

    /**
     * 接收时间
     */
    @TableField("receive_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiveDate;

    /**
     * 通知状态;0：未读1：已读
     */
    @TableField("status")
    @Size(max = 2, message = "{noMoreThan}")
    private String status;

    /**
     * 新增人
     */
    @TableField("created_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 新增时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 修改人
     */
    @TableField("updated_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String deletedFlg;

}